﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace MiniFox.Web
{

    /// <summary>
    /// 
    /// </summary>
    [DataContract]
    public class ProcessException
    {
        string _code;

        ExceptionLevel _level;

        string _description;
        /// <summary>
        /// 
        /// </summary>
        /// <param name="code"></param>
        /// <param name="level"></param>
        /// <param name="description"></param>
        public ProcessException(string code, ExceptionLevel level, string description)
        {
            _code = code;
            _level = level;
            _description = description;
        }
        /// <summary>
        /// 
        /// </summary>
        [DataMember]
        public string Code
        {
            get { return _code; }
            set { _code = value; }
        }
        /// <summary>
        /// 
        /// </summary>
        [DataMember]
        public ExceptionLevel Level
        {
            get { return _level; }
            set { _level = value; }
        }
        /// <summary>
        /// 
        /// </summary>
        [DataMember]
        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }
    }
    /// <summary>
    /// 
    /// </summary>
    public enum ExceptionLevel
    {
        /// <summary>
        /// 
        /// </summary>
        Information = 1,
        /// <summary>
        /// 
        /// </summary>
        Warning = 3,
        /// <summary>
        /// 
        /// </summary>
        Error = 255
    }
}
